﻿<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action="" lay-filter="form">
            <div class="main-container">
                <input type="hidden" id="id" name="id" value="0" />
                <div class="layui-form-item">
                    <label class="layui-form-label">书名</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" autocomplete="off" placeholder="请输入书籍名称" class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">作者</label>
                    <div class="layui-input-block">
                        <input type="text" name="author" autocomplete="off" placeholder="请输入作者名称" class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">ISBN</label>
                    <div class="layui-input-block">
                        <input type="text" name="ISBN" autocomplete="off" placeholder="请输入ISBN" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">出版社</label>
                    <div class="layui-input-block">
                        <input type="text" name="press" autocomplete="off" placeholder="请输入出版社" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图书室</label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            @Html.DropDownList("LibraryId",ViewBag.SelectLibrary as IEnumerable<SelectListItem>,new {lay_filter="LibraryId"})
                        </div>
                        <div class="layui-input-inline">
                            <select id="bookselfId" name="bookselfId" lay-filter="bookselfId"></select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">封面</label>
                    <div class="layui-input-block">
                        <input type="hidden" id="cover" name="cover">
                        <div class="layui-upload-drag" id="uploadCover">
                            <i class="layui-icon"></i>
                            <p>点击上传，或将文件拖拽到此处</p>
                            <div class="layui-hide" id="coverShow">
                                <img src="" alt="上传成功后渲染" style="max-width: 196px">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">PDF版</label>
                    <div class="layui-input-block">
                        <input type="text" id="pdf" name="pdf" autocomplete="off" placeholder="请点击选择PDF书籍" readonly="readonly" class="layui-input">
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
@section Styles{
<style>
    .layui-form {
        max-width: 900px;
        margin: auto;
    }
    #pdf{
        cursor:pointer;
    }
</style>
}